package hottargui.domain.semi;

import hottargui.domain.*;

public class SemiAfterDieRollActionStrategyImpl implements AfterDieRollActionStrategy {

	private StateMachine _sm;
	private AfterDieRollActionStrategy _gammaAfterDieStrategy;
	private AfterDieRollActionStrategy _betaAfterDieStrategy;

	public SemiAfterDieRollActionStrategyImpl(StateMachine sm,
			AfterDieRollActionStrategy gammaAfterDieStrategy,
			AfterDieRollActionStrategy betaAfterDieStrategy){
		_sm = sm;
		_gammaAfterDieStrategy = gammaAfterDieStrategy;
		_betaAfterDieStrategy = betaAfterDieStrategy;
	}

	public boolean doFollowUpOnRollAction(int diceFaceValue) {
		if (_sm.getState() == State.endRound) {
			return _gammaAfterDieStrategy.doFollowUpOnRollAction(diceFaceValue);
		} else {
			return _betaAfterDieStrategy.doFollowUpOnRollAction(diceFaceValue);
		}
	}
}